package cn.wolfcode.rbac.service.impl;

import cn.wolfcode.rbac.domain.Customer;
import cn.wolfcode.rbac.domain.Customertracehistory;
import cn.wolfcode.rbac.mapper.CustomertracehistoryMapper;
import cn.wolfcode.rbac.query.QueryObject;
import cn.wolfcode.rbac.service.ICustomertracehistoryService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CustomertracehistoryServiceImpl implements ICustomertracehistoryService {
    @Autowired
    private CustomertracehistoryMapper customertracehistoryMapper;
    @Override
    public PageInfo selectAll(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
        List<Customertracehistory> list = customertracehistoryMapper.selectAll(qo);
        return new PageInfo(list);
    }

    @Override
    public int insert(Customertracehistory customertracehistory) {
        return this.customertracehistoryMapper.insert(customertracehistory);
    }

    @Override
    public int update(Customertracehistory customertracehistory) {
        return this.customertracehistoryMapper.update(customertracehistory);
    }
}
